home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1992 July / Nautilus-3-8 / Nautilus-3-8.bin / Tools & Utilities / Techy Stuff / Doco ƒ / CSMP ƒ / CSMP-V1-075.TXT < prev    next >
Encoding:
Text File  |  1992-06-04  |  44.3 KB  |  1,231 lines

  1. C.S.M.P. Digest             Sat, 09 May 92       Volume 1 : Issue 75
  2.  
  3. Today's Topics:
  4.  
  5.     Floating Windows
  6.     MacTudor
  7.     Dynamic INIT Loading
  8.     Comm. Tbx/MacTCP?
  9.     PAP - where is programming info?
  10.     Memory Manager Problems & System 7.0.1?
  11.     PLookupName weirdness
  12.     Simple text engine needed
  13.     Symantec/THINK C ftp site
  14.     Pointers to struct and Objects
  15.  
  16.  
  17. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  18.  
  19. These digests are available (by using FTP, account anonymous, your email
  20. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  21. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  22. Questions list.  The last several issues of the digest are available from
  23. sumex-aim.stanford.edu as well.
  24.  
  25. These digests are also available via email.  Just send a note saying that you
  26. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  27. automatically receive each new digest as it is created.
  28.  
  29. The digest is a collection of articles from the internet newsgroup comp.sys.
  30. mac.programmer.  It is designed for people who read c.s.m.p. semi-regularly
  31. and want an archive of the discussions.  If you don't know what a newsgroup
  32. is, you probably don't have access to it.  Ask your systems administrator(s)
  33. for details.  (This means you can't post questions to the digest.)
  34.  
  35. The articles in these digests are taken directly from comp.sys.mac.programmer.
  36. They are not edited; all articles included in this digest are in their original
  37. posted form.  The only articles that are -not- included in these digests are
  38. those which didn't receive any replies (except those that give information
  39. rather than ask a question).  All replies to each article are concatenated
  40. onto the original article in the order in which they were received.  Article
  41. threads are not added to the digests until the last article added to the
  42. thread is at least one month old (this is to ensure that the thread is dead
  43. before adding it to the digests).
  44.  
  45. Send administrative mail to mkelly@cs.uoregon.edu.
  46.  
  47. -------------------------------------------------------
  48.  
  49. From: mgraf@sydvm1.VNET.IBM.COM (Michael Graf)
  50. Subject: Floating Windows
  51. Date: 11 Mar 92 16:33:18 GMT
  52. Organization: Australian Programming Centre (IBMA)
  53.  
  54. Can anyone point me in the correct direction for some information on how
  55. to implement floating windows, as seen in 'tear-off' menus, various packages,
  56. etc. etc. I cannot find (probably, as I have not looked in the correct
  57. place) information on how to implement them, and what window definitions
  58. are needed.
  59.  
  60.  Are there any special tricks, rules or warnings that anyone can give me
  61. when trying to code these windows (Pascal) or locations where sample code
  62. may be found ?
  63.  
  64.  Any help, advice or direction is most appreciated.
  65. Thanx, in advance.....
  66.  
  67.  
  68. **********************************************************************
  69. Regards,
  70.   Michael Graf                             (mgraf@sydvm1.vnet.ibm.com)
  71. **********************************************************************
  72.  
  73. +++++++++++++++++++++++++++
  74.  
  75. From: orpheus@reed.edu (P. Hawthorne)
  76. Date: 12 Mar 92 11:12:44 GMT
  77. Organization: Reed College, Portland OR
  78.  
  79.  
  80.   mgraf@sydvm1.VNET.IBM.COM (Michael Graf) writes:
  81. . Are there any special tricks, rules or warnings that anyone can give me
  82. . when trying to code these windows (Pascal) or locations where sample code
  83. . may be found?
  84.  
  85.   I bring good news and bad news. 
  86.  
  87.   First, the good news: 
  88.   Some introductory source code for handling floating windows is on
  89. sumex-aim.stanford.edu. Actually, it is fairly advanced code, and can be
  90. quickly integrated into an application if you like it.
  91.   No special window definition functions are absolutely required, but they
  92. are consistantly done with smaller than average title bars that are filled
  93. with a different texture than your vanilla document window. Not hard.
  94.   Once you have a window definition function, marking a floating window can
  95. be as simple as putting a special constant into the windowKind field of the
  96. WindowRecord, which the grafPtr or windowPtr just so happens to point to.
  97.  
  98.   Now, for the bad news:  
  99.   The Window Manager was never designed for this, and special routines must
  100. be used in place of your favorite toolbox calls. In the replacement, one
  101. does call the toolbox routines, of course.  However, one calls them as your
  102. routines cope with a seemingly endless stream of special cases. One tries
  103. to predetermine as much as possible, but that almost makes it harder.
  104.   The aforementioned source code is not production quality by any means. I
  105. would advise reconsidering floating windows seriously before diving in.  A
  106. fair amount of grueling testing is required, complicated by the linked list
  107. that represents the window hierarchy itself, the demonic hack that is known
  108. as MultiFinder or the Process Manager, plus the subtle problem of debugging
  109. window relationships with source and debug windows loitering around.
  110.   In fact, nobody on this group seems to be satisfied with their code.
  111. Personally, I gave up and just started to assume that everyone was using
  112. MultiFinder and that desk accessories would always be in their own layer.
  113.   There is source available as part of MacApp, the Think Class Library, and
  114. my own class library, which has yet to be named. You are welcome to mine,
  115. if you are using Think Pascal and you don't have a Radius Rocket.
  116.  
  117.     Theus
  118.     orpheus@reed.edu
  119.  
  120. +++++++++++++++++++++++++++
  121.  
  122. From: scott@mcl.mcl.ucsb.edu (Scott Bronson)
  123. Date: 6 Apr 92 05:25:54 GMT
  124.  
  125. Has anyone out there gotten a floating window to work in a ResEdit
  126. extension (RSSC)?  I followed all the sample code in ResEdit Complete
  127. by Peter Alley and Carolyn Strange, but I get random and sporadic
  128. crashes.  I would try to describe them here, but I can't see that
  129. anyone would find that information useful.  In a nutshell: the floating
  130. window has a 50% chance of appearing.  If it does appear, the system
  131. takes events in the floating window fine, but crashes on MouseDown
  132. events in the main window, and always crashes on close.  If the floating
  133. window doesn't come up, any the system works OK until I go to close, then
  134. crash.  Sometimes it crashes when I click in the content region of
  135. my editor window.
  136.  
  137. When I say random crash, I mean *random*.  I don't think the same thing
  138. has happened more than twice so far!  All different--all exciting. :-(
  139.  
  140. Has anyone at all got any sample code that successfully implements
  141. any type of floating window for any resource editor in any language
  142. and any development system at all?  At this point, I'll take whatever
  143. I can get!
  144.  
  145. Thanks for any help at all.
  146.  
  147.     - Scott
  148.  
  149. +++++++++++++++++++++++++++
  150.  
  151. From: wstomv@wsinfo01.win.tue.nl (Tom Verhoeff)
  152. Date: 6 Apr 92 14:24:36 GMT
  153. Organization: Eindhoven Univ. of Technology, The Netherlands
  154.  
  155. In article <scott.702537954@mcl> scott@mcl.mcl.ucsb.edu (Scott Bronson) writes:
  156. >Has anyone out there gotten a floating window to work in a ResEdit
  157. >extension (RSSC)?
  158.  
  159. Can someone please explain what FLOATING WINDOWS are?  I tried to find
  160. out through Inside Macintosh X-Ref, but without success.  They are,
  161. for instance, also mentioned in Inside Macintosh volume VI (top of p. 5-8):
  162.  
  163.     [When receiving a suspend event,] [y]our application should
  164.     also hide any floating windows, selections, and so on.
  165.  
  166. Tom
  167. - -- 
  168. INTERNET: wstomv@win.tue.nl  /    Eindhoven University of Technology
  169. VOICE: +31 40 47 41 25      /    Dept of Mathematics & Computing Science
  170. FAX: +31 40 43 66 85       /    PO Box 513, NL-5600 MB Eindhoven, Netherlands
  171.  
  172. ---------------------------
  173.  
  174. From: sbill@informix.com (Bill Stackhouse)
  175. Subject: MacTudor
  176. Date: 1 Apr 92 23:41:26 GMT
  177. Organization: Informix Software, Inc.
  178.  
  179. What is the current status of MacTudor? Is there a phone number for the
  180. publisher?
  181.  
  182. Thanks
  183. Bill Stackhouse
  184. stack@oak.informix.com
  185.  
  186. +++++++++++++++++++++++++++
  187.  
  188. From: dougm@bradbury.cns.caltech.edu (Doug McNought)
  189. Organization: California Institute of Technology
  190. Date: Thu, 2 Apr 1992 13:28:08 GMT
  191.  
  192. In article <1992Apr1.234126.3615@informix.com> sbill@informix.com (Bill Stackhouse) writes:
  193. >What is the current status of MacTudor? Is there a phone number for the
  194. >publisher?
  195.  
  196. Wow! I hadn't heard of this! Henry XIII on a disk! When do we get the modern
  197. version, MacWindsor? 
  198. :) ;) ;}
  199.  
  200. - -- 
  201. <><><><><><><><><><><><><><><>Go Orioles<><><><><><><><><><><><><><><><>
  202. <> Doug McNaught                          dougm@descartes.caltech.edu <>
  203. <>  Help!!! I'm addicted to *Spaceward Ho!* Is there a support group? <>
  204. <><><><><><><><><><><><><><><>Go Orioles<><><><><><><><><><><><><><><><>
  205.  
  206. +++++++++++++++++++++++++++
  207.  
  208. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  209. Date: 2 Apr 92 15:05:34 GMT
  210. Organization: Kalamazoo College
  211.  
  212. sbill@informix.com (Bill Stackhouse) writes:
  213. >What is the current status of MacTudor? Is there a phone number for the
  214. >publisher?
  215. >
  216. >Thanks
  217. >Bill Stackhouse
  218. >stack@oak.informix.com
  219.  
  220. MacTudor has been out of print for the last four hundred years,
  221. unfortunately.  The last issue's feature articles were "Half-Timbre:
  222. arbitrary frequencies with the Sound Manager," "Terminate those scuzzy
  223. gables!", and "Source for the latest WDEF: Palladian windows."
  224.  
  225. There was some kind of MacTudor revival earlier this century, but it
  226. never got very far off the ground.
  227.  
  228. Recently, someone in Anaheim started a magazine with a similar title;
  229. the estate of Queen Mary I is investigating the trademark, I hear.
  230. You can reach MacTutor at 714-777-1255, fax 714-777-6972, or
  231. mactutor@applelink.apple.com.
  232. - -- 
  233.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  234.  
  235. +++++++++++++++++++++++++++
  236.  
  237. From: CXT105@psuvm.psu.edu (Christopher Huckabay Modeller Tate)
  238. Date: 2 Apr 92 14:46:26 GMT
  239. Organization: Penn State University
  240.  
  241. In article <1992Apr2.132808.25093@cco.caltech.edu>,
  242. dougm@bradbury.cns.caltech.edu (Doug McNought) says:
  243. >
  244. >In article <1992Apr1.234126.3615@informix.com> sbill@informix.com (Bill
  245. >Stackhouse) writes:
  246. >>What is the current status of MacTudor? Is there a phone number for the
  247. >>publisher?
  248. >
  249. >Wow! I hadn't heard of this! Henry XIII on a disk! When do we get the modern
  250. >version, MacWindsor?
  251. >:) ;) ;}
  252.  
  253. Oh, MacWindsor isn't for North American distribution; it's the edition
  254. they designed for European use -- based in Hannover.  ;-)
  255.  
  256. And the Scots have their own -- MacStewart.   ;-) ;-)
  257.  
  258. - -------
  259. Christopher Tate        |  "Computer Science has more real-world
  260.                         |   applications than rotisserie baseball."
  261. cxt105@psuvm.psu.edu    |
  262. Bitnet:  CXT105@PSUVM   |       -- Ben Liblit, next-door neighbor
  263.  
  264. +++++++++++++++++++++++++++
  265.  
  266. From: chuq@Apple.COM (Chuq Von Rospach)
  267. Date: 2 Apr 92 17:08:11 GMT
  268. Organization: I is a writur
  269.  
  270. sbill@informix.com (Bill Stackhouse) writes:
  271.  
  272. >What is the current status of MacTudor? 
  273.  
  274. I talked to Sir Harry Wellingham last week. MacTudor (which we all know is
  275. the long-awaited architectural CAD program) is still in Beta test. They've
  276. had an unfortunate setback recently, when testing showed that someone
  277. accidentally swapped the doric and corinthian columns in the library, so
  278. they're having to go back and re-digitize and do regression testing.
  279.  
  280. The current hope is to have the package on the shelves in Mid-June.
  281.  
  282. - -- 
  283.             Chuq "IMHO" Von Rospach, Enterprise Products Support
  284.             chuq@apple.com | GEnie:CHUQ & MAC.BIGOT | ALink:CHUQ
  285.                Book Reviewer, Amazing Stories =+= Member, SFWA
  286.            Editor, OtherRealms =+= #include <standard/disclaimer.h>
  287.  
  288. And lo, though I travel deep through the valley of the archetypes, I shall
  289. fear no evil, for I know that the Great Overlord shall protect me in all my
  290. endeavours, for no matter how stupid or trite I become, if I snuff it, He'll
  291. be forced to fill the last 100 pages without his Hero.
  292.  
  293. (so what if I'm a day late?)
  294.  
  295. +++++++++++++++++++++++++++
  296.  
  297. From: sbill@informix.com (Bill Stackhouse)
  298. Date: 2 Apr 92 21:00:41 GMT
  299. Organization: Informix Software, Inc.
  300.  
  301. The new phone number for the company publishing MacTudor is 
  302. (310) 575-4343. The first issue will be out at the end of April
  303. for the April/May issue. The person said that it will have the
  304. same format which I hope means it will cover the same kind of
  305. information in the same level of detail.
  306.  
  307. Bill Stackhouse
  308. stack@oak.informix.com
  309.  
  310. +++++++++++++++++++++++++++
  311.  
  312. From: Roy_Lovejoy@adeptsln.cts.com
  313. Date: 7 Apr 92 04:51:29 GMT
  314. Organization: Adept Solutions
  315.  
  316. WOW!
  317. All this energy over one typo.
  318. ;) 
  319. - -- 
  320. - -----------------+--------------------------------------------------
  321. Roy Lovejoy      | internet:  roy@adeptsln.cts.com
  322. Head RGB Guy     | AppleLink: adept
  323. Adept Solutions  | CIS:       72447,1447
  324.  
  325. ---------------------------
  326.  
  327. From: zobkiw@world.std.com (Joe Zobkiw)
  328. Subject: Dynamic INIT Loading
  329. Date: 3 Apr 92 15:10:57 GMT
  330. Organization: The World Public Access UNIX, Brookline, MA
  331.  
  332. Here is an idea I've had in the past that may or may not work as planned.
  333.  
  334. There are numerous times when I would like to load an INIT/Extension 
  335. without having to reboot my Macintosh. Now, I realize that some INITs 
  336. _depend_ on the fact that they are loading before the Finder has launched,
  337. etc...but...wouldn't it be cool to be able to automatically load (and
  338. maybe even unload) INITs dynamically?
  339.  
  340. If we could only put them in their own heap (that _looked_ like the system
  341. heap to them)...hmmm...
  342.  
  343. Any ideas?
  344.  
  345.  
  346. - -- 
  347. <--------------------------------------------------->
  348.  joe zobkiw                     zobkiw@world.std.com
  349.  mac.synthesis.MIDI.development.C.asm.communications
  350. >---------------------------------------------------<
  351.  
  352. +++++++++++++++++++++++++++
  353.  
  354. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  355. Organization: Integrated Systems Laboratory, ETH, Zurich
  356. Date: Mon, 6 Apr 1992 10:35:07 GMT
  357.  
  358. In article <BM50uA.5G8@world.std.com> zobkiw@world.std.com (Joe Zobkiw) writes:
  359. >Here is an idea I've had in the past that may or may not work as planned.
  360.  
  361. May not.
  362.  
  363. >There are numerous times when I would like to load an INIT/Extension 
  364. >without having to reboot my Macintosh. Now, I realize that some INITs 
  365. >_depend_ on the fact that they are loading before the Finder has launched,
  366. >etc...but...wouldn't it be cool to be able to automatically load (and
  367. >maybe even unload) INITs dynamically?
  368.  
  369. Sure would be cool.
  370.  
  371. >If we could only put them in their own heap (that _looked_ like the system
  372. >heap to them)...hmmm...
  373.  
  374. Doesn't help. Most INITs do their work by patching Traps. Under a MultiFinder
  375. like environment, which is becoming more and more common, it is already
  376. impossible to patch a trap for all applications in a portable way (or am I
  377. mistaken about that ?). When it comes to removing trap patches, things get even
  378. more ugly.
  379.  
  380. Matthias
  381.  
  382. - -----
  383. Matthias Neeracher                                   neeri@iis.ethz.ch
  384.  "You must have picked up that copy of Scarlett instead of Inside Mac
  385.   when you tried to find the right call..." -- Keith Rollin
  386.  
  387. +++++++++++++++++++++++++++
  388.  
  389. From: zobkiw@world.std.com (Joe Zobkiw)
  390. Organization: The World Public Access UNIX, Brookline, MA
  391. Date: Mon, 6 Apr 1992 15:49:37 GMT
  392.  
  393.  
  394. Maybe...someday ;)
  395.  
  396. - -- 
  397. <--------------------------------------------------->
  398.  joe zobkiw                     zobkiw@world.std.com
  399.  mac.synthesis.MIDI.development.C.asm.communications
  400. >---------------------------------------------------<
  401.  
  402. +++++++++++++++++++++++++++
  403.  
  404. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  405. Organization: Integrated Systems Laboratory, ETH, Zurich
  406. Date: Mon, 6 Apr 1992 10:35:07 GMT
  407.  
  408. In article <BM50uA.5G8@world.std.com> zobkiw@world.std.com (Joe Zobkiw) writes:
  409. >Here is an idea I've had in the past that may or may not work as planned.
  410.  
  411. May not.
  412.  
  413. >There are numerous times when I would like to load an INIT/Extension 
  414. >without having to reboot my Macintosh. Now, I realize that some INITs 
  415. >_depend_ on the fact that they are loading before the Finder has launched,
  416. >etc...but...wouldn't it be cool to be able to automatically load (and
  417. >maybe even unload) INITs dynamically?
  418.  
  419. Sure would be cool.
  420.  
  421. >If we could only put them in their own heap (that _looked_ like the system
  422. >heap to them)...hmmm...
  423.  
  424. Doesn't help. Most INITs do their work by patching Traps. Under a MultiFinder
  425. like environment, which is becoming more and more common, it is already
  426. impossible to patch a trap for all applications in a portable way (or am I
  427. mistaken about that ?). When it comes to removing trap patches, things get even
  428. more ugly.
  429.  
  430. Matthias
  431.  
  432. - -----
  433. Matthias Neeracher                                   neeri@iis.ethz.ch
  434.  "You must have picked up that copy of Scarlett instead of Inside Mac
  435.   when you tried to find the right call..." -- Keith Rollin
  436.  
  437. +++++++++++++++++++++++++++
  438.  
  439. From: zobkiw@world.std.com (Joe Zobkiw)
  440. Organization: The World Public Access UNIX, Brookline, MA
  441. Date: Mon, 6 Apr 1992 15:49:37 GMT
  442.  
  443.  
  444. Maybe...someday ;)
  445.  
  446. - -- 
  447. <--------------------------------------------------->
  448.  joe zobkiw                     zobkiw@world.std.com
  449.  mac.synthesis.MIDI.development.C.asm.communications
  450. >---------------------------------------------------<
  451.  
  452. +++++++++++++++++++++++++++
  453.  
  454. From: beard@ux5.lbl.gov (Patrick C Beard)
  455. Date: 7 Apr 92 19:17:32 GMT
  456. Organization: Berkeley Systems, Inc.
  457.  
  458. In article <BM50uA.5G8@world.std.com> zobkiw@world.std.com (Joe Zobkiw) writes:
  459. #Here is an idea I've had in the past that may or may not work as planned.
  460. #
  461. #There are numerous times when I would like to load an INIT/Extension 
  462. #without having to reboot my Macintosh. Now, I realize that some INITs 
  463. #_depend_ on the fact that they are loading before the Finder has launched,
  464. #etc...but...wouldn't it be cool to be able to automatically load (and
  465. #maybe even unload) INITs dynamically?
  466. #
  467. #If we could only put them in their own heap (that _looked_ like the system
  468. #heap to them)...hmmm...
  469. #
  470. #Any ideas?
  471. #
  472. #
  473. #-- 
  474. #<--------------------------------------------------->
  475. # joe zobkiw                     zobkiw@world.std.com
  476. # mac.synthesis.MIDI.development.C.asm.communications
  477. #>---------------------------------------------------<
  478.  
  479.  
  480. Watch out for my paper and talk coming up at MacHack this summer. I will
  481. be discussing a technique for developing INIT's that lets you write them
  482. as applications. The technique could easily be extended to load INIT's
  483. dynamically. In fact, this  has been a dream of mine for some time.
  484.  
  485. If you can't attend MacHack, the code and paper will be available on the
  486. CD-ROM.
  487.  
  488. I might event release early drafts of the paper to those who would feel
  489. qualified to comment/criticize the techniques presented.
  490.  
  491. Patrick C. Beard
  492. Berkeley Systems, Inc.
  493.  
  494. ---------------------------
  495.  
  496. From: tcd@vax5.cit.cornell.edu
  497. Subject: Comm. Tbx/MacTCP?
  498. Date: 3 Apr 92 15:51:16 GMT
  499. Organization: Cornell University
  500.  
  501.  
  502.      I am thinking about getting involved in some network programming on the
  503. Mac, and was trying to figure out how MacTCP and the Communications Toolbox
  504. fit together.  It seems to me that MacTCP should be implemented as a tool in
  505. the Communications Toolbox, and I'm wondering why it isn't.  From my initial
  506. reading, the 2 products seem to be unaware of each other.  Am I
  507. misunderstanding how the different communications layers inter-relate?
  508. Also, I'm wondering to what extent the Communications Toolbox is catching
  509. on.  Are most new applications for which it is relevant using it, and if not
  510. why not?  Thanks in advance for any comments.
  511. Tim Dorcey
  512. tcd@cornella.cit.cornell.edu
  513.  
  514. +++++++++++++++++++++++++++
  515.  
  516. From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
  517. Date: 3 Apr 92 17:36:56 GMT
  518. Organization: University of Illinois at Urbana-Champaign
  519.  
  520. tcd@vax5.cit.cornell.edu writes:
  521. >fit together.  It seems to me that MacTCP should be implemented as a tool in
  522. >the Communications Toolbox, and I'm wondering why it isn't.  From my initial
  523. >reading, the 2 products seem to be unaware of each other.  Am I
  524. >misunderstanding how the different communications layers inter-relate?
  525.  
  526. To some extent, yes.  MacTCP is at a lower level than the Comm Toolbox; it
  527. can't (reasonably) be done as a Comm Tool.  However, if you ask "Why can't
  528. most TCP connections be done with a Comm Toolbox Telnet Tool?" then you are
  529. indeed asking a sensible question.
  530.  
  531. I can only answer for myself.  I do support the Comm Toolbox, but I also
  532. do direct MacTCP connections.  There are two reasons why:
  533.  
  534. 1) Abstraction.  Both the blessing and the curse of the CTB is that you
  535. don't deal with the "guts" of your connection.  The positive side is that
  536. you don't have to worry about those guts; you let the tool handle them.
  537. The negative side is that you have little control over what's going on,
  538. and little information about what's happening.  By going to MacTCP directly,
  539. I have minute control over how things happen, and I can see exactly what
  540. the problem is when things go wrong.
  541.  
  542. 2) Cost.  There is no free telnet tool for the CTB.  Therefore, freeware
  543. and shareware developers are reluctant to use such a tool, since they
  544. can't be sure their users will have it.  MacTCP isn't free, but developers
  545. can license it quite reasonably (IMHO), and everybody who wants to use
  546. TCP/IP is going to have to have it anyway.
  547. - -- 
  548. Steve Dorner, U of Illinois Computing Services Office
  549. Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
  550.  
  551. +++++++++++++++++++++++++++
  552.  
  553. From: gerson@parc.xerox.com (Dan Gerson)
  554. Date: 8 Apr 92 22:49:43 GMT
  555. Organization: Xerox PARC, Palo Alto, CA
  556.  
  557. In article <1992Apr3.173656.23853@ux1.cso.uiuc.edu> dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:
  558.  
  559.    To some extent, yes.  MacTCP is at a lower level than the Comm Toolbox; it
  560.    can't (reasonably) be done as a Comm Tool.  However, if you ask "Why can't
  561.    most TCP connections be done with a Comm Toolbox Telnet Tool?" then you are
  562.    indeed asking a sensible question.
  563.  
  564. The MacX software from Apple comes with a MacTCP CTB tool, although it
  565. isn't on the CTB distribution, and I believe that you are not legally
  566. supposed to use it except with MacX.  In light of your comments about
  567. MacTCP v.s. the CTB, I assume that the MacTCP tool implements only
  568. simple connections.  But does anyone know what it actually does, and
  569. what its real status (e.g. future) is?
  570. - --
  571.  
  572. Dan Gerson                    gerson@parc.xerox.com
  573. Xerox Palo Alto Research Center            415-494-4745
  574. 3333 Coyote Hill Road
  575. Palo Alto, CA 94304
  576. USA
  577.  
  578. +++++++++++++++++++++++++++
  579.  
  580. From: creiman@void.ncsa.uiuc.edu (Charlie Reiman)
  581. Date: 9 Apr 92 00:22:53 GMT
  582. Organization: University of Illinois at Urbana
  583.  
  584. gerson@parc.xerox.com (Dan Gerson) writes:
  585.  
  586. >In article <1992Apr3.173656.23853@ux1.cso.uiuc.edu> dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:
  587.  
  588. >   To some extent, yes.  MacTCP is at a lower level than the Comm Toolbox; it
  589. >   can't (reasonably) be done as a Comm Tool.  However, if you ask "Why can't
  590. >   most TCP connections be done with a Comm Toolbox Telnet Tool?" then you are
  591. >   indeed asking a sensible question.
  592.  
  593. >The MacX software from Apple comes with a MacTCP CTB tool, although it
  594. >isn't on the CTB distribution, and I believe that you are not legally
  595. >supposed to use it except with MacX.  In light of your comments about
  596. >MacTCP v.s. the CTB, I assume that the MacTCP tool implements only
  597. >simple connections.  But does anyone know what it actually does, and
  598. >what its real status (e.g. future) is?
  599.  
  600. The MacTCP tool is clearly label "For MacX only." This isn't just legal
  601. hoodoo voodoo, it's a hard fact. If it were a _true_ MacTCP tool, you
  602. would be able to specify the remote TCP port to connect to. With X
  603. windows, the correct service port is 6000, which is hardcoded into the
  604. tool (near as I can figure, anyway).
  605.  
  606. Unless you can type X graphics commands into your vt100 terminal tool,
  607. the "MacTCP tool" is completely worthless for anything but MacX.
  608.  
  609. "MacTCP tool" is a terrribly misleading name. Had the authors named it
  610. "MacX tool", much misunderstanding would have been avoided. You are not
  611. the first person to claim the MacX tool is useful for something other
  612. than X windows.
  613. - -- 
  614. Charlie Reiman - creiman@ncsa.uiuc.edu
  615. "Reading USENET is like drinking from a firehose, you'll get very wet but
  616.  you probably will still be thirsty." - Steve Steinberg
  617.  
  618. ---------------------------
  619.  
  620. From: bin@primate.wisc.edu (Brain in Neutral)
  621. Subject: PAP - where is programming info?
  622. Date: 6 Apr 92 18:23:09 GMT
  623. Organization: Cafe Limbo
  624.  
  625. What do I read to find out how to use Printer Access Protocol?
  626. Inside Macintosh doesn't say much about it.  Inside AppleTalk (2nd
  627. edition) discusses it at length, but from an abstract viewpoint (e.g.,
  628. no data structure listings or function call prototypes).  I grepped
  629. through my THINK C *.h files for "PAP" to no avail.
  630.  
  631.  
  632. - -- 
  633. Paul DuBois
  634. dubois@primate.wisc.edu
  635.  
  636. +++++++++++++++++++++++++++
  637.  
  638. From: scott@phylo.life.uiuc.edu (MrBadExample)
  639. Date: 6 Apr 92 19:47:50 GMT
  640. Organization: University of Illinois at Urbana
  641.  
  642. There are references to it in Programmer the LaserWriter and Programming with
  643. AppleTalk...
  644. - --
  645.         "Language is a virus from Outer Space."
  646.                     - William S. Burroughs
  647.  
  648. +++++++++++++++++++++++++++
  649.  
  650. From: zben@ni.umd.edu (Charles B. Cranston)
  651. Organization: UM Home for the Terminally Analytical
  652. Date: Mon, 6 Apr 1992 21:21:51 GMT
  653.  
  654. In article <5880@uakari.primate.wisc.edu>, bin@primate.wisc.edu
  655. (Brain in Neutral) writes:
  656.  
  657. > What do I read to find out how to use Printer Access Protocol?
  658. > Inside Macintosh doesn't say much about it.  Inside AppleTalk (2nd
  659. > edition) discusses it at length, but from an abstract viewpoint (e.g.,
  660. > no data structure listings or function call prototypes).  I grepped
  661. > through my THINK C *.h files for "PAP" to no avail.
  662.  
  663. There were several articles in the first and second year of MacTutor
  664. that convered the programming interface.  Here's some C I recently
  665. wrote that (klugily) calls them:
  666.  
  667.  
  668. /* Printer Access Protocol (PAP) routines.
  669.  * Note: there is one extra argument at the end of each argument list.
  670.  * The actual call passes a pointer to the locked code and the assembly
  671.  * (actually hex) code here pops it off and jumps to it.
  672.  */
  673.  
  674. /* Open connection to PAP printer over the (appletalk) network.
  675.  */
  676. pascal OSErr PAPOpen(
  677.     short *refnum,            /* PAP refnum returned here */
  678.     char *printername,        /* NBP entity name of printer to open */
  679.     short flowquantum,        /* Max data in flight (512 byte blocks) */
  680.     struct papstatus *statusbuf,    /* Monitor status */
  681.     short *compstate,        /* Monitor status */
  682.     Ptr papptr            /* Artifact of calling scheme */
  683.        ) = {
  684.     0x205F,                /* Move.L (A7)+,A0  ; Get pap pointer */
  685.     0x4E90                /* JSr    (A0)      ; Call at offset 0 */
  686. };
  687.  
  688. /* Read a block of readback data from the printer.
  689.  * Even though we don't look at the data we still must do this
  690.  * lest the printer drive protocol hang on returning us data.
  691.  * We are interested in the EOF because this means the last page got out.
  692.  */
  693. pascal OSErr PAPRead(
  694.     short refnum,            /* PAP refnum */
  695.     char *buffer,            /* Pointer to buffer for incoming data */
  696.     short *length,            /* Length of data returned here */
  697.     short *eof,            /* EOF flag returned here */
  698.     short *compstate,        /* Monitor status */
  699.     Ptr papptr            /* Artifact of calling scheme */
  700.        ) = {
  701.     0x205F,                /* Move.L (A7)+,A0  ; Get pap pointer */
  702.     0x4EA8, 0x0004            /* JSr    4(A0)     ; Call at offset 4 */
  703. };
  704.  
  705. /* Write a block of data to the printer
  706.  */
  707. pascal OSErr PAPWrite(
  708.     short refnum,            /* PAP refnum */
  709.     char *buffer,            /* Pointer to outgoing data */
  710.     short length,            /* Length of outgoing data */
  711.     short eof,            /* EOF flag */
  712.     short *compstate,        /* Monitor status */
  713.     Ptr papptr            /* Artifact of calling scheme */
  714.        ) = {
  715.     0x205F,                /* Move.L (A7)+,A0  ; Get pap pointer */
  716.     0x4EA8, 0x0008            /* JSr    8(A0)     ; Call at offset 8 */
  717. };
  718.  
  719. /* Asynchronously probe status of printer
  720.  * (unused here, just included for completeness
  721.  */
  722. pascal OSErr PAPStatus(
  723.     char *printername,        /* NBP entity name of printer to check */
  724.     struct papstatus *statusbuf,    /* Monitor status */
  725.     struct addrblock *netaddr,    /* "Hint"network address to try */
  726.     Ptr papptr            /* Artifact of calling scheme */
  727.        ) = {
  728.     0x205F,                /* Move.L (A7)+,A0  ; Get pap pointer */
  729.     0x4EA8, 0x000C            /* JSr    12(A0)    ; Call at offset 12 */
  730. };
  731.  
  732. /* Close connection to the printer
  733.  */
  734. pascal OSErr PAPClose(
  735.     short refnum,            /* PAP refnum */
  736.     Ptr papptr            /* Artifact of calling scheme */
  737.        ) = {
  738.     0x205F,                /* Move.L (A7)+,A0  ; Get pap pointer */
  739.     0x4EA8, 0x0010            /* JSr    16(A0)    ; Call at offset 16 */
  740. };
  741.  
  742. /* Close all connections and prepare for unload of PAP code.
  743.  */
  744. pascal OSErr PAPUnload(
  745.     Ptr papptr            /* Artifact of calling scheme */
  746.        ) = {
  747.     0x205F,                /* Move.L (A7)+,A0  ; Get pap pointer */
  748.     0x4EA8, 0x0014            /* JSr    20(A0)    ; Call at offset 20 */
  749. };
  750.  
  751.  
  752. ---------------------------
  753.  
  754. From: neilg@fraser.sfu.ca (Neil K. Guy)
  755. Subject: Memory Manager Problems & System 7.0.1?
  756. Organization: Simon Fraser University, Burnaby, B.C., Canada
  757. Date: Sun, 5 Apr 1992 19:41:12 GMT
  758.  
  759.  (apologies if this is an FAQ)
  760.  
  761.  Does anyone know if Apple has fixed the memory manager bug that affects
  762. machines from the IIci on up? I have an INIT that supposedly fixes the
  763. problem, but I was wondering if it's necessary with 7.0.1 or with the
  764. new System 7 tuneups... thanks in advance!
  765.  
  766.  - Neil K. (neil_k_guy@sfu.ca)
  767.  
  768. +++++++++++++++++++++++++++
  769.  
  770. From: bskendig@shine.Princeton.EDU (Brian Kendig)
  771. Date: 6 Apr 92 20:03:28 GMT
  772. Organization: Starfleet Academy, Princeton University
  773.  
  774. In article <neilg.702502872@sfu.ca> neilg@fraser.sfu.ca (Neil K. Guy) writes:
  775. > Does anyone know if Apple has fixed the memory manager bug that affects
  776. >machines from the IIci on up? I have an INIT that supposedly fixes the
  777. >problem, but I was wondering if it's necessary with 7.0.1 or with the
  778. >new System 7 tuneups... thanks in advance!
  779.  
  780. If you're talking about the "MMInit" to fix the memory hints bug in
  781. the IIci and IIfx, DON'T USE IT.  Or, at least, be VERY careful when
  782. using it -- while it can speed up your machine considerably, I've also
  783. heard that it's not very stable at all and tends to do as much harm as
  784. good by crashing your machine periodically.
  785.  
  786. Apple reportedly fixed this bug in System 7.0, so it's not needed if
  787. you're running 7.0 or 7.0.1 with or without a Tune-Up.
  788.  
  789.      << Brian >>
  790.  
  791. - -- 
  792. | Brian S. Kendig       --/\-- Tri     bskendig@phoenix.Princeton.EDU, @PUCC
  793. | Computer Science BSE  |/  \| Quad  You gave your life to become the person
  794. | Princeton University  /____\ clubs    you are right now.  Was it worth it?
  795.  
  796. +++++++++++++++++++++++++++
  797.  
  798. From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
  799. Date: 7 Apr 92 15:23:46 GMT
  800. Organization: Royal Institute of Technology, Stockholm, Sweden
  801.  
  802. @fraser.sfu.ca (Neil K. Guy) writes:
  803.  
  804.     Does anyone know if Apple has fixed the memory manager bug that affects
  805.    machines from the IIci on up? I have an INIT that supposedly fixes the
  806.    problem, but I was wondering if it's necessary with 7.0.1 or with the
  807.    new System 7 tuneups... thanks in advance!
  808.  
  809. That INIT was a dirty hack i nthe first place...
  810.  
  811. No, it's not necessary with any sustem >= 7.0
  812.  
  813. - -- 
  814. h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
  815.  
  816. +++++++++++++++++++++++++++
  817.  
  818. From: glenn@gla-aux.uucp (Glenn Austin)
  819. Date: Tue, 7 Apr 92 14:03:39 PST
  820. Organization: The Pit Lane
  821.  
  822.  
  823. In article <neilg.702502872@sfu.ca> (comp.sys.mac.programmer), neilg@fraser.sfu.ca (Neil K. Guy) writes:
  824. >  (apologies if this is an FAQ)
  825. >  Does anyone know if Apple has fixed the memory manager bug that affects
  826. > machines from the IIci on up? I have an INIT that supposedly fixes the
  827. > problem, but I was wondering if it's necessary with 7.0.1 or with the
  828. > new System 7 tuneups... thanks in advance!
  829.  
  830. If you are talking about MM Init, I have one piece of advice for you:
  831.  
  832.   DON'T USE IT!!!
  833.  
  834. It was originally designed for use with 6.0.5 on the IIci, but was extremely
  835. buggy, and was never supposed to have been released outside of Apple --
  836. but someone let it out.
  837.  
  838. System 7.0 and later (and possibly 6.0.7/.8, but I haven't checked it out)
  839. have fixes in place for the memory manager bug.
  840.  
  841. ===============================================================================
  842. | Glenn L. Austin                | "Turn too soon, run out of room.           |
  843. | Macintosh Wizard and           |    Turn too late, much better fate."       |
  844. | Auto Racing Driver             |   -- Jim Russell Racing School Instructors |
  845. | Usenet:  glenn@gla-aux.uucp or glenn%gla-aux.uucp@skinner.cs.uoregon.edu    |
  846. ===============================================================================
  847.  
  848. ---------------------------
  849.  
  850. From: jahnke@biosci.arizona.edu (Jerome Jahnke)
  851. Subject: PLookupName weirdness
  852. Date: 7 Apr 92 03:53:20 GMT
  853. Organization: Biology Learning Center
  854.  
  855. I have been working on some AppleTalk stuff, and things are going along
  856. smoothly until I was goofing with NBP and PLookupName. I get it all set
  857. up and let PLookupName go to work. The Function PLookupName returns an
  858. OSErr of 1. I could understand any error code less than 0. And would
  859. hope for an error code of 0. But 1 is totally beyond what I expected.
  860.  
  861. I then decided to throw caution to the wind and NBPExtract what I was
  862. getting back anyway. It all worked. It finds EVERYTHING it is supposed
  863. to. So I am getting an unknown error code, but it looks like everything
  864. is working just fine. Soooooo the question becomes. 1) Do I just fly fast
  865. and loose and ignore any error 0 and above in PLookupName. OR 2) Do I have
  866. a real problem, and should I keep digging. I have only run this on one 
  867. machine. It runs other stuff just fine (including the testNBP code from
  868. one of the snippets packages).
  869.  
  870. Other particulars. I am writing this in C++ (but not MacApp). Using MPW's
  871. C v3.2.1 and CFront v3.2d17. Hardware is a Mac IIfx using system 7 on 
  872. ethertalk.
  873.  
  874. Any help would be appreciated.
  875.  
  876. Jer,
  877. - ----
  878. Jerome Jahnke
  879. Biology Learning Center
  880. University of Arizona
  881. 'jahnke@biosci.arizona.edu' or +1 (602) 621-3820
  882.  
  883. +++++++++++++++++++++++++++
  884.  
  885. From: tjc@pacvax.UUCP (Tom Colley)
  886. Date: 7 Apr 92 14:54:00 GMT
  887. Organization: Pacer Software Inc., Westborough, MA USA
  888.  
  889. In article <1992Apr7.035320.9787@organpipe.uug.arizona.edu> jahnke@biosci.arizona.edu (Jerome Jahnke) writes:
  890. >I have been working on some AppleTalk stuff, and things are going along
  891. >smoothly until I was goofing with NBP and PLookupName. I get it all set
  892. >up and let PLookupName go to work. The Function PLookupName returns an
  893. >OSErr of 1. I could understand any error code less than 0. And would
  894. >hope for an error code of 0. But 1 is totally beyond what I expected.
  895. >...
  896. >Jer,
  897. >----
  898. >Jerome Jahnke
  899. >Biology Learning Center
  900. >University of Arizona
  901. >'jahnke@biosci.arizona.edu' or +1 (602) 621-3820
  902.  
  903. If you had said the ioResult field was 1, I would say it sounds as if you 
  904. are making an asynchronous call (async calls stuff a 1 into ioResult
  905. until they complete).  But you said the function returns a 1.  It sounds
  906. like you are assigning the result of a comparison instead of comparing the
  907. assignment.
  908.  
  909. /* this will cause result to be 1 if PLookupName returns noErr */
  910. if (result = PLookupName (pbptr, false) == noErr)
  911.     printf ("%d\n", result);
  912.  
  913. /* this will work as desired, note the extra parens */
  914. /*  v                                   v   */
  915. if ((result = PLookupName (pbptr, false)) == noErr)
  916.     printf ("%d\n", result);
  917.  
  918. The '==' has higher precedence than the '=', so result is getting
  919. assigned the result of the compare (1 if equal, 0 if not).
  920.  
  921. Tom Colley
  922. Pacer Software Inc.
  923. <tjc@pacersoft.com>
  924.  
  925. +++++++++++++++++++++++++++
  926.  
  927. From: jahnke@biosci.arizona.edu (Jerome Jahnke)
  928. Date: 7 Apr 92 19:08:05 GMT
  929. Organization: Biology Learning Center
  930.  
  931. In article <643@pacvax.UUCP>, tjc@pacvax.UUCP (Tom Colley) writes:
  932. > If you had said the ioResult field was 1, I would say it sounds as if you 
  933. > are making an asynchronous call (async calls stuff a 1 into ioResult
  934. > until they complete).  But you said the function returns a 1.  It sounds
  935. > like you are assigning the result of a comparison instead of comparing the
  936. > assignment.
  937.  
  938. Much to my chagrin you are closer than you know. It was not quite what you
  939. stated, but instead I this is what my code looked like:
  940.  
  941.      My Problem
  942.          |
  943.          v 
  944. TheErr = !PLookupName( &TheMPP, false );
  945. if(TheErr != noErr)
  946.      cout << "The Result of PLookup was: " << TheErr << "\n";
  947.  
  948. All I can say in my defense is it was late, I had too much caffine, space 
  949. aliens stole both my socks and my brain, ummmm the dog distracted me and the
  950. cat typed it in. I don't know, but thanks all for you help. It is amazing
  951. what a good nights sleep will do for you.
  952.  
  953. > Tom Colley
  954. > Pacer Software Inc.
  955. > <tjc@pacersoft.com>
  956.  
  957. Jer,
  958. - ----
  959. Jerome Jahnke
  960. Biology Learning Center
  961. University of Arizona
  962. 'jahnke@biosci.arizona.edu' or +1 (602) 621-3820
  963.  
  964. +++++++++++++++++++++++++++
  965.  
  966. From: zobkiw@world.std.com (Joe Zobkiw)
  967. Date: 8 Apr 92 17:34:36 GMT
  968. Organization: The World Public Access UNIX, Brookline, MA
  969.  
  970. >> The Function PLookupName returns an OSErr of 1
  971.  
  972. Are you sure you initialized the variable that PLookupName is returning
  973. it's OSErr into?
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980. - -- 
  981. <--------------------------------------------------->
  982.  joe zobkiw                     zobkiw@world.std.com
  983.  mac.synthesis.MIDI.development.C.asm.communications
  984. >---------------------------------------------------<
  985.  
  986. ---------------------------
  987.  
  988. From: rps32513@uxa.cso.uiuc.edu (Ronald P. Smith)
  989. Subject: Simple text engine needed
  990. Organization: University of Illinois at Urbana
  991. Date: Wed, 8 Apr 1992 00:54:30 GMT
  992.  
  993. I'm looking for a good text engine with no limit as to size of text.
  994. I need to be able to display a 7 meg document in a scrolling window.  The
  995. program would keep at most 100K in memory at a time, loading in a different
  996. section of the text as needed.  I thought about writing something myself,
  997. but don't really know where to start.  What is the accepted way to display
  998. more than 32K of text in a window? Is it to re-write textedit using
  999. quickdraw routines?  If anyone knows of a good, simple text engine I could
  1000. buy or could show me the light as to how to write something myself, I'd
  1001. greatly appreciate it.
  1002.  
  1003. p.s. For the meantime, all I need to do is to display 7 megs of selectable,non-
  1004.      wrappable text, but I'll need to add the capability to edit later also.
  1005.  
  1006. - --RS     Ron Smith (rps32513@uxa.cso.uiuc.edu)
  1007.  
  1008. +++++++++++++++++++++++++++
  1009.  
  1010. From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
  1011. Date: 8 Apr 92 17:08:24 GMT
  1012. Organization: Royal Institute of Technology, Stockholm, Sweden
  1013.  
  1014. .cso.uiuc.edu> rps32513@uxa.cso.uiuc.edu (Ronald P. Smith) writes:
  1015.  
  1016.    I'm looking for a good text engine with no limit as to size of text.
  1017.    I need to be able to display a 7 meg document in a scrolling window.  The
  1018.    program would keep at most 100K in memory at a time, loading in a different
  1019.    section of the text as needed.  I thought about writing something myself,
  1020.    but don't really know where to start.  What is the accepted way to display
  1021.  
  1022. Welcome to the Number One Pet Peeve Of Mac Programmers (tm)
  1023.  
  1024. I would recommend the Word Solutions Engine from DataPak.
  1025. It's $394 per license, plus $1 for media (floppy) and the
  1026. license lets you use the library any way you want except
  1027. re-selling it as a library or in its "virgin" form.
  1028.  
  1029. It handles > 32k text, and they sell an add-on for paging
  1030. to disk (among other add-ons)
  1031.  
  1032. The functionality is a little quirkier than TextEdit, but
  1033. not much. I have had some problems with the selection not
  1034. updating correctly, but that's probably my own fault.
  1035.  
  1036. - -- 
  1037. h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
  1038.  
  1039. ---------------------------
  1040.  
  1041. From: jth@acpub.duke.edu (JASON HOLTZAPPLE)
  1042. Subject: Symantec/THINK C ftp site
  1043. Date: 7 Apr 92 19:10:27 GMT
  1044. Organization: Duke University; Durham, N.C.
  1045.  
  1046. I used to know of the existance of an ftp site containing THINK C
  1047. upgrades, snippets of code, etc. To my knowledge, it was the
  1048. "official" Symantec site. Could anyone with the ftp address
  1049. please post it to this newsgroup or email me directly?
  1050.  
  1051. Many thanks,
  1052. Jason Holtzapple
  1053.  
  1054.  
  1055.  
  1056. - -- 
  1057.  /----------------------------------------------------------------\
  1058. | Jason Holtz                            jth@raphael.acpub.duke.edu|
  1059. |       "And the knowledge that they fear is a weapon to be        |
  1060.  \ ********  used against them"  - The Weapon, 1982  ************ /
  1061.  
  1062. +++++++++++++++++++++++++++
  1063.  
  1064. From: alana@sisters.cs.uoregon.edu (Thomas Alan Akins)
  1065. Organization: /local/lib/rn/organization
  1066. Date: Wed, 8 Apr 1992 04:26:21 GMT
  1067.  
  1068. In article <2276@news.duke.edu> jth@acpub.duke.edu (JASON HOLTZAPPLE) writes:
  1069. >I used to know of the existance of an ftp site containing THINK C
  1070. >upgrades, snippets of code, etc. To my knowledge, it was the
  1071. >"official" Symantec site. Could anyone with the ftp address
  1072. >please post it to this newsgroup or email me directly?
  1073. >
  1074. >Many thanks,
  1075. >Jason Holtzapple
  1076.  
  1077. ftp to ics.uci.edu
  1078. /mac/think-c
  1079.  
  1080.  
  1081. - -- 
  1082. *                                            Alan Akins                      *
  1083. *       "I could say 'addition'              alana@cs.uoregon.edu            *
  1084. *        when I mean ... 'basketball.'"      University of Oregon            *
  1085. *                        - E. Tick           Department of Computer Science  *
  1086.  
  1087. +++++++++++++++++++++++++++
  1088.  
  1089. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  1090. Date: 8 Apr 92 14:30:38 GMT
  1091. Organization: Symantec Corp.
  1092.  
  1093. >>>>> On 8 Apr 92 04:26:21 GMT, alana@sisters.cs.uoregon.edu (Thomas Alan Akins) said:
  1094.  
  1095.  > In article <2276@news.duke.edu> jth@acpub.duke.edu (JASON HOLTZAPPLE) writes:
  1096. >>I used to know of the existance of an ftp site containing THINK C
  1097. >>upgrades, snippets of code, etc. To my knowledge, it was the
  1098. >>"official" Symantec site. Could anyone with the ftp address
  1099. >>please post it to this newsgroup or email me directly?
  1100.  
  1101.  > ftp to ics.uci.edu
  1102.  > /mac/think-c
  1103.  
  1104. Just a minor clarification -- the ftp site at ics.uci.edu is not an
  1105. official Symantec ftp site. It does contain the latest updates and a
  1106. bunch of source code examples, however.
  1107.  
  1108.     -phil
  1109. - --
  1110.    Phil Shapiro                                   Software Engineer
  1111.    Language Products Group                     Symantec Corporation
  1112.            Internet: phils@cs.brandeis.edu
  1113.  
  1114. ---------------------------
  1115.  
  1116. From: kevin@crash.cts.com (Kevin Hill)
  1117. Subject: Pointers to struct and Objects
  1118. Organization: Crash TimeSharing, El Cajon, CA
  1119. Date: Wed, 08 Apr 1992 06:09:46 GMT
  1120.  
  1121.   I am currently programming a CDocument Object...  However, I have about 15-20 panes in the document, that get created in BuildWindow.  My problem is this,
  1122.  
  1123.    I have created a structure that looks something like this.
  1124.  
  1125.    struct a{
  1126.     CPaneBorder    *border;
  1127.     CStaticText    *title;
  1128.     union {
  1129.         CStaticText    edit;
  1130.         CEditText    edit1; 
  1131.         CDateText    date;
  1132.         CPhoneText    phone;
  1133.         }b;
  1134.     int    type;
  1135.     };
  1136.  
  1137. In the instance variables for the Document object, I declare struct a  *tracker;  The big problem comes when try to allocate memory for it.
  1138.  
  1139.   for(i = -; i < 9; i++)
  1140.         
  1141.     
  1142.        track[i] = (struct a)NewPtr(sizeof(struct a));
  1143.  
  1144.   the compiler does not seem to like that...
  1145.    oh yes, the (struct a) should be (struct a*), sorry.
  1146.  
  1147.   anyone have any ideas?
  1148.  -Kevin
  1149.   
  1150.    Also, is there a  limit to the number of objects CDocument can have?
  1151.  -Kevin Hill
  1152.  
  1153.  
  1154. +++++++++++++++++++++++++++
  1155.  
  1156. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  1157. Organization: Kalamazoo College
  1158. Date: Wed, 8 Apr 1992 13:40:42 GMT
  1159.  
  1160. kevin@crash.cts.com (Kevin Hill) writes:
  1161. >
  1162. >I am currently programming a CDocument Object...
  1163. >However, I have about 15-20 panes in the document,
  1164. >that get created in BuildWindow.
  1165.  
  1166. My two cents' of advice, first.  Create all the panes inside one big
  1167. pane, that's the first penny.  That way, your document will have an
  1168. itsMainPane, so it will be happy.  If you ever want to paint the
  1169. background behind these panes, or move them all, or something, it'll be
  1170. easier if you have one big pane that contains them.
  1171.  
  1172. The second penny is, keeping track of the individual panes is already
  1173. done for you with the main pane's itsSubViews instance variable.  You
  1174. don't need to create an array to get to them;  you can just FindItem()
  1175. on the list.  Before you allocate an array of these things, check out
  1176. CPane's Contains() method and make sure you know how to use CCluster's
  1177. search methods.  You should only need an array for the individual panes
  1178. if you really need instant access to them, and if they're arranged in
  1179. some repetitive fashion.
  1180.  
  1181. Now on to this problem...
  1182.  
  1183. >   I have created a structure that looks something like this.
  1184. >
  1185. >   struct a{
  1186. >    CPaneBorder    *border;
  1187. >    CStaticText    *title;
  1188. >    union {
  1189. >        CStaticText    edit;
  1190. >        CEditText    edit1; 
  1191. >        CDateText    date;
  1192. >        CPhoneText    phone;
  1193. >        }b;
  1194. >    int    type;
  1195. >    };
  1196.  
  1197. I assume you means "CStaticText *edit", etc.  You can't declare an
  1198. variable of an object type, only a pointer to it.
  1199.  
  1200. >In the instance variables for the Document object, I declare
  1201. >struct a  *tracker;
  1202. >The big problem comes when try to allocate memory for it.
  1203. >
  1204. >  for(i = -; i < 9; i++)
  1205. >        
  1206. >    
  1207. >       track[i] = (struct a*)NewPtr(sizeof(struct a));
  1208. >
  1209. >  the compiler does not seem to like that...
  1210.  
  1211. If you define track as a pointer to (struct a), then track[i] is not a
  1212. pointer, it's the structure itself.  You probably want an array of
  1213. pointers to structures:  "struct a *track[10]" or somesuch.
  1214.  
  1215. Like I said, I wouldn't advise using this particular data structure...
  1216.  
  1217. >   Also, is there a  limit to the number of objects CDocument can have?
  1218.  
  1219. However much memory you have...
  1220. - -- 
  1221.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  1222.  "Almost all portables today employ passive-matrix LCDs, and no one expects
  1223.  active-matrix screens to be cost-competitive for a few years" -PC World 2/92
  1224.  
  1225. ---------------------------
  1226.  
  1227. End of C.S.M.P. Digest
  1228. **********************
  1229.